/*
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-06-17 13:48:46
 * @LastEditTime: 2019-08-31 09:49:40
 * @LastEditors: Please set LastEditors
 */
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
let NODE_ENV = process.env.NODE_ENV;
let mode = '';
mode = NODE_ENV == 'production' ? 'history' : 'hash';
//console.log(process.env)

export default new Router({
  linkActiveClass: "active",
  mode: 'hash',
  //base:'/sjp2p/',
  routes: [
    {
      path: '/',
      name: '主页',
      meta: {
        title: '画图',
      },
      component: resolve => { require(['@/views/Index'], resolve) },
    },
    {
      path: '*',
      name: '主页',
      meta: {
        title: '画图',
      },
      component: resolve => { require(['@/views/Index'], resolve) },
    },
    {
      path: '/page1',
      name: 'page1',
      meta: {
        title: '',
      },
      component: resolve => { require(['@/components/Page1'], resolve) },
    },
    {
      path: '/page2',
      name: 'page2',
      meta: {
        title: '',
      },
      component: resolve => { require(['@/components/Page2'], resolve) },
    },
    {
      path: '/page3',
      name: 'page3',
      meta: {
        title: '',
      },
      component: resolve => { require(['@/components/Page3'], resolve) },
    },{
      path: '/page4',
      name: 'page4',
      meta: {
        title: '',
      },
      component: resolve => { require(['@/components/Page4'], resolve) },
    },{
      path: '/page5',
      name: 'page5',
      meta: {
        title: '',
      },
      component: resolve => { require(['@/components/Page5'], resolve) },
    },
    // {
    //   path: '*',
    //   name: 'error',
    //   meta:{
    //     title:'首金网官网',
    //   },
    //   component: resolve => { require(['@/views/error/404'], resolve)}
    // }
  ]
})

